package com.lam.mall.entity;

import com.lam.common.validate.group.Add;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotBlank;
import java.util.Date;
import com.lam.common.utils.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableField;
import javax.validation.constraints.Null;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lam.common.base.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.FieldFill;

/**
 * 物流公司对象 mall_delivery
 * 
 * @author admin
 * @date 2023-04-27
 */
@TableName("mall_delivery")
public class Delivery implements BaseEntity{

    /** 主键 */
    @Null(groups = Add.class, message="id必须为空")
    @TableId(type = IdType.AUTO)
    private String id;
    
    /** 物流公司名称 */
    @NotBlank(message = "物流公司名称不能为空")
    @Size(max = 50, message = "物流公司名称长度不能超过50个字符")
    private String dvyName;

    /** 公司主页 */
    @NotBlank(message = "公司主页不能为空")
    @Size(max = 255, message = "公司主页长度不能超过255个字符")
    private String companyHomeUrl;
    
    @NotBlank(message = "公司编码不能为空")
    @Size(max = 100, message = "公司编码长度不能超过255个字符")
    private String code;

    /** 建立时间 */
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /** 修改时间 */
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    /** 物流查询接口 */
    @NotBlank(message = "物流查询接口不能为空")
    @Size(max = 520, message = "物流查询接口长度不能超过520个字符")
    private String queryUrl;

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    } 

    public void setDvyName(String dvyName) {
        this.dvyName = dvyName;
    }

    public String getDvyName() {
        return dvyName;
    }    
    
    public void setCompanyHomeUrl(String companyHomeUrl) {
        this.companyHomeUrl = companyHomeUrl;
    }

    public String getCompanyHomeUrl() {
        return companyHomeUrl;
    }    
    
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getCreateTime() {
        return createTime;
    }    
    
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }    
    
    public void setQueryUrl(String queryUrl) {
        this.queryUrl = queryUrl;
    }

    public String getQueryUrl() {
        return queryUrl;
    }

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}    
    

}
